<!DOCTYPE html>
<html lang="en">
	<head>
    	<meta name="layout" content="main_mobile">
        <title>个人中心</title>     
        <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>	  
        <link rel="stylesheet" href="${resource(dir: 'css', file: 'user_account_2.0.css')}" type="text/css">
    </head>
<body>
	<script type="text/javascript">
	    wx.config({
	 	    debug: false,  // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
	 	    appId: '${appid}', // 必填，公众号的唯一标识
	 	    timestamp: "${timestamp}", // 必填，生成签名的时间戳
	 	    nonceStr: '${nonceStr}', // 必填，生成签名的随机串
	 	    signature: '${signature}',// 必填，签名，见附录1
	 	    jsApiList: ['checkJsApi' , 'onMenuShareAppMessage' , 'onMenuShareTimeline']
	 	});

	 	wx.ready(function(){
	 		wx.checkJsApi({
	 		    jsApiList: ['onMenuShareAppMessage' , 'onMenuShareTimeline'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
	 		    success: function(res) {
	 		       //alert('wx.check: '+JSON.stringify(res));
	 		    }
	 		});
	 		//发送给朋友分享功能
	 		wx.onMenuShareAppMessage({
	 		    title: '${user?.nickname}邀请你进入火堆公益众筹，一起助力教育', // 分享标题
	 		    desc: '关注火堆，为教育发声！', // 分享描述
	 		    link: '${shareUrl}', // 分享链接
	 		    imgUrl: '${imgUrl}', // 分享图标
				trigger: function () {
				//alert("点击按钮");
				},
	 		    success: function () { 
	 		        // 用户确认分享后执行的回调函数
	 		        $('.wx-share-box').removeClass('show');
	 		    },
	 		    cancel: function () { 
	 		        // 用户取消分享后执行的回调函数
	 		    	$('.wx-share-box').removeClass('show');
	 		    }
	 		});

	 		//分享到朋友圈
	 		wx.onMenuShareTimeline({
	 		    title: '${user?.nickname}邀请你进入火堆公益众筹，一起助力教育', // 分享标题
	 		    link: '${shareUrl}', // 分享链接
	 		    imgUrl: '${imgUrl}',  // 分享图标
	 		    success: function () { 
	 		        // 用户确认分享后执行的回调函数
	 		    	$('.wx-share-box').removeClass('show');
	 		    },
	 		    cancel: function () { 
	 		        // 用户取消分享后执行的回调函数
	 		    	$('.wx-share-box').removeClass('show');
	 		    }
	 		});

	 	});
	 	wx.error(function (res) {
			//alert('wx.error: '+JSON.stringify(res));
	    });
	</script>
	<div class="ui-footer ui-footer-navi ui-btn-group ui-border-t">
        <a href="/scfire" ><i class="i1"></i><div>首页</div></a>
        <a href="/scfire/project/fundPoolList"><i class="i2"></i><div>爱心池</div></a>
        <a href="/scfire/project/start"><i class="i3"></i><div>发起项目</div></a>
        <a href="/scfire/user/userCenter" class="active"><i class="i4"></i><div>个人中心</div></a>
    </div>
	<section class="ui-container">
        <ul class="user-top ui-list ui-list-link ui-list-active ui-list-cover ui-border-tb">
            <li>
                <div class="ui-avatar">
                	<g:if test="${user.headimgurl != null}">
                		<span style="background-image:url(${user.headimgurl})"></span>
                	</g:if>
                	<g:else>
                		<span style="background-image:url(${resource(dir:'images/demo',file:'demo-avatar-1.jpg')})"></span>
                	</g:else>      
                	<g:if test="${user.verify == 'pass'}">
                	<i>v</i>
                	</g:if>              
                </div>
                <g:if test="${user.verify == 'pass'}">
                	<a href="/scfire/user/userAuthInfo" class="ui-list-info" onclick="">
                    <h4 class="name">
                    	${user.realName}
                    	<!--i>v</i-->
                   	</h4>
                	</a>
                </g:if>
                <g:elseif test="${user.verify == 'wait'}">
                	<a href="/scfire/user/userAuthInfo" class="ui-list-info" onclick="">
                    <h4 class="name">
                    	${user.nickname}
                   	</h4>
                	</a>
                </g:elseif>
                <g:else>
                	<a  class="ui-list-info" href="/scfire/user/userAuthInfo" onclick="">
                    <h4 class="name">
                    	${user.nickname}
                   	</h4>
                	</a>
                </g:else>
                
            </li>
        </ul>
        
        <g:if test="${user.verify == 'refuse'}">
        <ul class="ui-list ui-list-text ui-list-link ui-list-active ui-list-cover ui-border-tb">
            <li class="ui-border-t">
                <div class="ui-list-thumb-s">
                    <span style="background-image:url(/scfire/images/icon-account-0.png)"></span>
                </div>
                <a href="/scfire/user/userAuthEdit" class="ui-list-info">
                    <p>修改实名信息</p>
                </a>
            </li>
        </ul>
       </g:if>

        <ul class="ui-list ui-list-text ui-list-link ui-list-active ui-list-cover ui-border-tb">
            <li class="ui-border-t">
                <div class="ui-list-thumb-s">
                    <span style="background-image:url(${resource(dir:'images',file:'icon-account-1.png')})"></span>
                </div>
                <a href="/scfire/user/userFeedBackDetail" class="ui-list-info">
                    <p>项目进展</p>
                </a>
            </li>
            <li class="ui-border-t">
                <div class="ui-list-thumb-s">
                    <span style="background-image:url(${resource(dir:'images',file:'icon-account-2.png')})"></span>
                </div>
                <a href="/scfire/user/userMyDonateDetail" class="ui-list-info">
                    <p>我捐赠的</p>
                </a>
            </li>
            <li class="ui-border-t">
                <div class="ui-list-thumb-s">
                    <span style="background-image:url(${resource(dir:'images',file:'icon-account-3.png')})"></span>
                </div>
                <a href="/scfire/user/userMyProjectDetail" class="ui-list-info">
                    <p>我发起的</p>
                </a>
            </li>
             <li class="ui-border-t">
                <div class="ui-list-thumb-s">
                    <span style="background-image:url(${resource(dir:'images',file:'icon-account-8.png')})"></span>
                </div>
                <a href="/scfire/subProject/subList" class="ui-list-info">
                    <p>一起捐</p>
                </a>
            </li>
            <!--
            <li class="ui-border-t">
                <div class="ui-list-thumb-s">
                    <span style="background-image:url(${resource(dir:'images',file:'icon-account-8.png')})"></span>
                </div>
                <a href="/scfire/index/festivalActivity?festid=1" class="ui-list-info">
                    <p>红包</p>
                </a>
            </li>
            -->
        </ul>

<%--       <div class="banner-wrap ft">--%>
<%--            <div class="txt-bottom"><a href="http://mp.weixin.qq.com/mp/homepage?__biz=MzAxNjM5NzExOQ==&hid=3&sn=e498fbdd2e826943340c0729061ac868#wechat_redirect">了解火堆</a><a href="/scfire/project/qrcode">关注火堆</a><img src="../images/ic-qrcode.png" alt=""></div>--%>
<%--            <img class="img-bottom" src="../images/logo_and_txt.png" alt="">--%>
<%--        </div>--%>
    </section>

	<div class="wx-share-box">
        <img class="arrow" src="../images/icon-share-arrow.png" alt="">
        <img class="txt" src="../images/txt-share.png" alt="">
    </div>

	<script type="text/javascript">
	(function() {
        $('.ui-list li h4 em').click(function(e){
            e.stopPropagation();
        	//location.href='http:www.baidu.com';
        });
    })();
	$('.wx-share-box').click(function(){
        $(this).removeClass('show');
    });
    $("#share").click(function(){
    	$('.wx-share-box').addClass('show');

    });
	</script>

</body>
</html>